package unit3.task3_1;

import java.util.Scanner;

public class FinanceInfoTest {
    public static void main(String[]args){
        FinanceInfo financelnfo=new FinanceInfo();
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入公司名称：");
        String companyName=sc.next();
        System.out.println("请输入定金收入：");
        double earnestIncome=sc.nextDouble();
        System.out.println("请输入押金收入：");
        double depositIncome=sc.nextDouble();
        System.out.println("请输入租金收入：");
        double rentIncome=sc.nextDouble();
        System.out.println("请输入其他收入：");
        double otherIncome=sc.nextDouble();
        System.out.println("请输入员工成本：");
        double staffCost=sc.nextDouble();
        System.out.println("请输入房面房租：");
        double rentCost=sc.nextDouble();
        System.out.println("请输入水电成本：");
        double hydropowerCost=sc.nextDouble();
        System.out.println("请输入税收费用：");
        double taxCost=sc.nextDouble();
        System.out.println("请输入其他费用：");
        double otherCost=sc.nextDouble();
        financelnfo.setCompanyName(companyName);
        financelnfo.setEarnestIncome(earnestIncome);
        financelnfo.setDepositIncome(depositIncome);
        financelnfo.setRentIncome(rentIncome);
        financelnfo.setOtherIncome(otherIncome);
        financelnfo.setStaffCost(staffCost);
        financelnfo.setRentCost(rentCost);
        financelnfo.setHydropowerCost(hydropowerCost);
        financelnfo.setTaxCost(taxCost);
        financelnfo.setOtherCost(otherCost);
        double sumIncome=financelnfo.calIncome();
        System.out.println("收入="+sumIncome);
        double sumCost=financelnfo.calCost();
        System.out.println("成本="+sumCost);
        double netIncome=financelnfo.calNetIncome();
        System.out.println("净收入="+netIncome);
    }
}
